import yagmail

from sys_config.sys_config import config_info


class mail:

    @classmethod
    def auto_send_mail(cls, html_dir, to):
        mail_send = yagmail.SMTP(user=config_info.email_username, password=config_info.email_password, host=config_info.emali_host)
        subject = "自动化测试报告"
        contents = "请查看附件"
        mail_send.send(to, subject, contents, html_dir)
